home *** CD-ROM | disk | FTP | other *** search
- Path: nntp-server.caltech.edu!ansok
- From: ansok@alumnae.caltech.edu (Gary E. Ansok)
- Newsgroups: comp.lang.c++
- Subject: Re: Leap year
- Date: 29 Mar 1996 18:46:20 GMT
- Organization: Caltech Alumni Association
- Message-ID: <4jhb5s$4mr@gap.cco.caltech.edu>
- References: <3135A7F2.2120@hiwaay.net> <4ilcd9$3q0@clarknet.clark.net> <31596B2F.5219@mail.tju.edu> <4jegf6$7d2@news.hal.com>
- NNTP-Posting-Host: alumnae.caltech.edu
-
- In article <4jegf6$7d2@news.hal.com>, Spike White <spike@hal.com> wrote:
- >No, because 1800, 1900 and 2100 are not leap years. The rule is:
- >"every 4 yrs, except for every 100 yrs, except for every 400 yrs". In
- >C, that's
- >
- > return (!(y % 4) && ((y % 100) || !(y % 400)));
- >
- >and that doesn't even account for the Gregorian calendar (used before
- >1752).
-
- If you're talking about past centenary years, the answer is
- "it depends."
-
- If you meet an old guy who claims he was born on Feb. 29, 1900,
- is he necessarily lying? (Hint: What if he was born in Russia?)
-
- Genealogy software has a lot of fun keeping track of different
- leap year rules, different start-of-year rules, different times
- to switch between one calendar and another, etc.
-
- NitPick: The Gregorian calendar is what we use now. The Julian
- calendar is what was switched from. 1752 is correct for Britain
- and its then-colonies (Protestant countries changed at different
- times in the 16/1700s). The Catholic countries had changed over
- a century and a half earlier (1582). Some places didn't change
- until a century and a half later.
-
- Gary Ansok
- ansok@alumni.caltech.edu
-